function clifAction() {
	ar3++;
	if(ar3<80){
		mctx.drawImage(roof,10,40,210,52);//静止

	}else if(range(80,140)){
		blockDown(83,halfclif);//掉下半格
		mctx.drawImage(roof,10,40,210,52);

	}else if(range(140,200)){
		blockDown(87,clif);//block全部掉下来
		mctx.drawImage(roof,10,40,210,52);

	}else if (range(200,220)) {
		mctx.drawImage(roof,10,40,210,52);
		mctx.drawImage(clif, 88, 87);//静止一会

	}else if (range(220,240)) {
		mctx.drawImage(roof,10,40,210,52);
		mctx.drawImage(black, 88, 87);//黑脸一会

	}else if (range(240,260)) {
		mctx.drawImage(roof,10,40,210,52);
		mctx.drawImage(clif, 88, 87);//静止一会

	}else if (range(260,280)) {
		mctx.drawImage(roof,10,40,210,52);
		mctx.drawImage(black, 88, 87);//黑脸一会

	}else if (range(280,300)) {
		mctx.drawImage(roof,10,40,210,52);
		mctx.drawImage(clif, 88, 87);//静止一会

	}else if (range(300,327)) {
		ar1 += 0.3;
		mctx.drawImage(roof,10,40,210,52);
		clifStepDown(87-parabola(ar1,-8.1));//向下压

	}else if (ar3>= 327&& ar3 <377) {
		ar2 += 0.3;
		roofJump(parabola2(ar2,-15));//跳起来
		clifRotate(parabola2(ar2,-15));//转起来

	}else{
		mctx.drawImage(roof,10,40,210,52);
	}
}
function range(st,nd){
	return ar3>=st&&ar3<nd;
}
function clifStepDown(y) {
	mctx.drawImage(clif, 88, y);
}

function clifRotate(y) {
	if (fra >= 49) {
		fra = 0;
		ar1 = 0;
		ar2 = 0;
		ar3 = 200;
		alpha = 0;
	}
	radian += Math.sin(alpha);
	
	fra++;
	mctx.save();
	mctx.translate(113, 113+y);
	mctx.rotate(radian);
	mctx.drawImage(clif, -25, -26);
	mctx.restore();

	alpha += Math.PI / 50;
	

}
function roofJump(y){
	mctx.drawImage(roof,10,y+40,210,52);
}
function parabola(x,b) {
	return x * x + b* x;
}
function parabola2(x,b) {
	return x * x +b * x;
}
function blockDown(y,obj){
	mctx.drawImage(obj, 88,y);
}